import { configureStore } from '@reduxjs/toolkit';
import { systemReducer, SystemState } from './system-slice';
import { imageReducer, ImageState } from './image-slice';
import { addressReducer, AddressState } from './address';

// 创建并直接导出 store
export default configureStore({
  reducer: {
    system: systemReducer,
    image: imageReducer,
    address: addressReducer,
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: false,
    }),
});

export interface RootState {
  system: SystemState;
  image: ImageState;
  address: AddressState;
}
